package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.CheckoutSettingsMapper;
import com.ruoyi.system.domain.CheckoutSettings;
import com.ruoyi.system.service.ICheckoutSettingsService;

/**
 * 结账设置 Service业务层处理
 *
 * @author ruoyi
 * @date 2025-05-12
 */
@Service
public class CheckoutSettingsServiceImpl implements ICheckoutSettingsService
{
    @Autowired
    private CheckoutSettingsMapper checkoutSettingsMapper;

    /**
     * 通过id查询结账设置
     *
     * @param id 结账设置主键
     * @return 结账设置
     */
    @Override
    public CheckoutSettings selectCheckoutSettingsById(Long id)
    {
        return checkoutSettingsMapper.selectCheckoutSettingsById(id);
    }

    /**
     * 查询结账设置列表列表
     *
     * @param checkoutSettings 结账设置
     * @return 结账设置
     */
    @Override
    public List<CheckoutSettings> selectCheckoutSettingsList(CheckoutSettings checkoutSettings)
    {
        return checkoutSettingsMapper.selectCheckoutSettingsList(checkoutSettings);
    }

    /**
     * 新增结账设置列表
     *
     * @param checkoutSettings 结账设置
     * @return 结果
     */
    @Override
    public int insertCheckoutSettings(CheckoutSettings checkoutSettings)
    {
        return checkoutSettingsMapper.insertCheckoutSettings(checkoutSettings);
    }

    /**
     * 修改结账设置列表
     *
     * @param checkoutSettings 结账设置
     * @return 结果
     */
    @Override
    public int updateCheckoutSettings(CheckoutSettings checkoutSettings)
    {
        return checkoutSettingsMapper.updateCheckoutSettings(checkoutSettings);
    }

    /**
     * 通过id批量删除结账设置信息
     *
     * @param ids 需要删除的结账设置主键
     * @return 结果
     */
    @Override
    public int deleteCheckoutSettingsByIds(Long[] ids)
    {
        return checkoutSettingsMapper.deleteCheckoutSettingsByIds(ids);
    }

    /**
     * 通过id删除结账设置列表信息
     *
     * @param id 结账设置主键
     * @return 结果
     */
    @Override
    public int deleteCheckoutSettingsById(Long id)
    {
        return checkoutSettingsMapper.deleteCheckoutSettingsById(id);
    }

    /**
     * 通过门店id查询结账设置详情
     *
     * @param storeId 门店id
     * @return 结账设置详情
     */
    @Override
    public CheckoutSettings selectByStoreId(Long storeId) {
        return checkoutSettingsMapper.selectByStoreId(storeId);
    }

}
